package com.amkai.aes.webservice.binary.objecthandler.importer;

import java.io.Serializable;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.amkai.aes.aescommon.service.importer.ZipCodeProviderJob;
import com.amkai.aes.aescommon.service.importer.ZipCodeProviderResult;
import com.amkai.aes.server.importer.ImporterProvider;
import com.amkai.aes.server.importer.ZipCodeProvider;
import com.amkai.aes.webservice.binary.JobObjectHandler;

public class ZipCodeHandler implements JobObjectHandler<ZipCodeProviderJob, Serializable, ZipCodeProviderResult> {
	private static final Log logger = LogFactory.getLog(ZipCodeHandler.class);

	@Override
	public ZipCodeProviderResult process(ZipCodeProviderJob job, Serializable object) throws Exception {
		ZipCodeProvider zp = new ZipCodeProvider();
		try {
			return zp.processJob(job, object);			
		} catch (Throwable e) {
			logger.error("DataExportHandler: ", e);
			throw new Exception(e);
		}
	}

}
